package com.cyj.minio.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: 代码初始化配置--@ConfigurationProperties当将该注解作用于方法上时，如果想要有效的绑定配置，
 * 那么该方法需要有@Bean注解且所属Class需要有@Configuration注解。https://www.cnblogs.com/tian874540961/p/12146467.html
 * @BelongsProject: SpringBoot-MinIO
 * @BelongsPackage: com.cyj.minio.config
 * @Author: ChenYongJia
 * @CreateTime: 2021-09-13 13:57
 * @Email: chen87647213@163.com
 * @Version: 1.0
 */
@Data
@RefreshScope
@Configuration
@ConfigurationProperties(prefix = "minio")
public class MinIoProperties {

    /**
     * minio地址--url+端口号
     */
    private String url;

    /**
     * 账号
     */
    private String accessKey;

    /**
     * 密码
     */
    private String secretKey;

    /**
     * 分区配置
     */
    private String chunkBucKetValue;

    /**
     * 桶名配置(限权的)
     */
    private String originFileBucKetValue;

    /**
     * 桶名配置(放行的)
     */
    private String allowOriginFileBucKetValue;

}
